package com.viknix.threadpool.manager.client.message;

import com.viknix.threadpool.manager.client.core.DynamicThreadPoolExecutor;
import com.viknix.threadpool.manager.common.model.PoolParameterInfo;

import java.util.List;

/**
 * @Author: Dongqi
 * @Date: 2021/11/22 09:54
 * @Version 1.0
 * @Description: 消息处理器
 */
public interface SendMessageHandler {

    /**
     * Get type.
     *
     * @return
     */
    String getType();

    /**
     * Send alarm message.
     *
     * @param alarmConfigs
     * @param dynamicThreadPoolExecutor
     */
    void sendAlertorMessage(List<MessageReceiver> alarmConfigs, DynamicThreadPoolExecutor dynamicThreadPoolExecutor);

    /**
     * Send change message.
     *
     * @param alarmConfigs
     * @param newParameter
     * @param oldParameter
     */
    void sendChangeMessage(List<MessageReceiver> alarmConfigs, PoolParameterInfo newParameter, PoolParameterInfo oldParameter);

}
